var privateObj = {
    callSafely: function (closure) {
        try {
            return closure();
        } catch (e) {
            console.log(e)
        }
        return false;
    }
}
var cache = {
    get: function (key) {
        return privateObj.callSafely(function () {
            return wx.getStorageSync(key)
        });
    },
    set: function (key, val) {
        return privateObj.callSafely(function () {
            return wx.setStorageSync(key, val)
        });
    },
} 

module.exports = cache